import Vue from 'vue'
import Router from 'vue-router'
import { base,routers } from './config'

Vue.use(Router)

let route = [{
  name: 'home',
  path: base,
  component: () => import('@/views/Home/Home.vue')
}];
routers.map(v => {
  route.push({
    name:v.name,
    path: `${base}${v.name}`,
    component: () => import(`@/views/${v.url}`)
  });
});
console.log("=======", route);
export default new Router({
  routes: route
})
